package combination;

/**
 * @Author: Doream
 * @Date: 2022/1/28 21:16
 */
// 菜单项类，属于叶子节点角色
public class MenuItem extends MenuComponent {
    public MenuItem(String name, int level) {
        this.name = name;
        this.level = level;
    }

    @Override
    public void print() {
        System.out.print(getName()+"  ");
    }
}
